Dr. Bob's Menu Helper **** PRG version 1.14 **** 07/09/89 Copyright 1989 W.D.Parks Updated: 07/10/89 **** 1.10 Updated: 07/14/89 **** 1.12 07/16/89 **** 1.14 Overview: A simple PRG dispatcher. Functions: Up to eight (8) GEM programs may be listed in a MENu file. At this time, only GEM or TOS programs (not TTP) are expected; no feature exists for a command line to be passed. Programability: When PRGMENU is executed, it clears the screen and then attempts to read a default menu file, PRGMENU.MEN. It then displays that file's contents as the available selections. If PRGMENU.MEN cannot be found in the default path then the file_selector is called to search for any .MEN files to be loaded. Aborting the File Selector will return you to the Desktop. A MENu file is a simple ascii file where each line contains a path specification for each menu selection... sample .MEN file: (line#1) C:\MEGAROIDS.PRG C:\PRINMENU1.PRG D:\CAL\START.PRG E:\WP\PAGESTREAM\PAGESTREAM.PRG C:\ARCSHELL.PRG G:\GENST2.PRG D:\BAS\HBASIC.PRG G:\ED.PRG Each line is terminated with the standard CR/LF (or a sole CR)... A line must start with the drive letter and must not have trailing spaces. (version 1.1x allows trailing spaces and also comments delimited by ";") A selection is made by pressing a number key 1-8. ESCape will exit to the desktop... The 0 (zero) key, loads an alternate MEN file via the file selector. The ESCAPE key will exit to the Desktop. PRGMENU was designed on a mono system, but should also work on color. Color has not been tested as of this writing, so give a hollar if'n it don't wanna work.... * Color HAS been tested. MED rez is ok (even in version 1.10), but LOW rez just didn't have the needed width, hence the narrowing of the menu box... (now my mono screen is almost empty) So, LOW-rez works! -------------------------------------------------------------------------- **** I found this lil program kinda neet... but It was irritating to have each line NOT have trailing spaces (sometimes my editor gets funky). And... Boy! It sure would be nice to just run a program that wasn't listed in the menu... My main concern in designing this program was to keep overhead down to a minimum; it isn't. And with the added lil ditties, the overhead grows even more... but now I feel it's more comfortable to use... The program lists at about 4.5k, but expands to 8k when loaded. Most of this extra space is simply GEM variables. My intentions are to add the standard menu-bar but then the size will grow even more... * also fixed a lil irritation: A menu file with more than 8 lines would print line#9, un-aligned... It don't do it no more now! **** 07/14/89 **** Modifications: * Only the program name is displayed in the menu box. (this may or may not be an improvement. Hard drive users sing, "Oh well") * A User-Title is checked for in the MEN file and if found will be displayed in the menu box (guess where!). A menu box title is specified in the first line of the file by an asterisk. (If no asterisk, then a program path is assumed.) Sample file: (line#1) *18 character title C:\MEGAROIDS.PRG ;asteroids game C:\PRINMENU1.PRG ;DB's printer menu D:\CAL\START.PRG ;DB's calendar E:\WP\PAGESTREAM\PAGESTREAM.PRG C:\ARCSHELL.PRG G:\GENST2.PRG ;assembler D:\BAS\HBASIC.PRG G:\ED.PRG ;non existant but so what I:\garbage\trash\junque.prg ;this item (#9) will not show **** 07/16/89 Some programs (particularly those that "fiddle" with undocumented aspects of the ST, and those that cannot exit in an orderly manner) cause aggrevating crashes if the ST is not reset. PRGMENU.prg uses the simplest method available in gemdos to run a program. There are no extra cookies tossed about, no mysterious addresses modified, no secret doors that get locked or unlocked. It was my intent to keep as pure a setup as possible to allow ANY legitimately written program to be executed. But "Wouldn't ya know it!" So. The solution: PRGMENU will now allow you to specify which menu items should reset your ST after running. I use this feature with Pagestream due to it's NEVER resetting the memory allocation properly and never allowing the desktop to gain COMPLETE control. "Well, how do you do this?" Funny you should ask... In the .MENu file, simply start the line with an exclamation point. run normally: C:\JOEY.PRG reset on exit: !C:\JOEY.PRG Each item will display as usual in the menu box, with the addition of a "!" beside the item that will cause a RESET when done. This works great on many games and many disk copying utilities. Leave E-Mail to: Dr. Bob on CHQ BBS 216 758-0284 24hrs 1200/2400 bps or US Mail to POB 45, Girard, OH 44420 W.D.Parks 7/10/89